/// <reference path="../../apicloud.d.ts" />
const vm = new Vue({
    el: '#main',
    data: {},
});

function apiready() {
    fxj.fixLayout();
}

function exitApp() {
    fxj.dialog.alert({
        title: '提示',
        msg: '您确定要退出分享家APP吗？',
        btnLeft: '不，我点错了',
        btnRight: '我就是要退出',
        rightCallback: async() => {
            localStorage.token = '';
            localStorage.removeItem('token');
            localStorage.clear();
            sessionStorage.clear();

            localStorage.setItem('_role', '0');
            await ajax({
                url: 'home/userLogin/logout'
            });
            api.rebootApp()
        },
    });
}

function callTel() {
    document.getElementById('callTel').click();
}